if (! (typeof (strjson) == 'object')) {
    strjson = {};
}

(function () {
    'use windows-1251'

    //debugger

    if (! (typeof (strjson.code) == 'function')) {
        strjson.code = function (str_in) {
            var jsonRes = {}

            //if ((typeof (str_in) == 'string') && (! (str_in == undefined)))
            if ((! (typeof (str_in) == 'undefined')) && (! (str_in == undefined)))
                for (var i = 0; i < str_in.length; i++) {
                    jsonRes [i] = str_in.charCodeAt (i)
                }
            else
                ;

            return jsonRes
        }
    }
    else
        ;

    if (! (typeof (strjson.decode) == 'function')) {
        strjson.decode = function (jsonObj) {
            var strRes = ""
        
            for (var key in jsonObj) {
                if (!isNaN(jsonObj[key])) {
                    if (jsonObj[key] == 60)
                        strRes += "&lt;"
                    else
                        strRes += String.fromCharCode(jsonObj[key])
                }
                else
                    ;
            }

            strRes = strRes.replace(/(&gt;)/g, ">").replace(/(&lt;)/g, "<").replace(/(&nbsp)/g, '')

            return strRes
        }
    }
    else
        ;

    if (! (typeof (strjson.request) == 'function')) {
        strjson.request = function (jsonObj) {
            var strRes = ""
        
            for (var key in jsonObj) {
                strRes += key + "=" + jsonObj [key] + "&"
            }

            strRes = strRes.substr (0, strRes.length - 1)

            return strRes
        }
    }
    else
        ;
}())

//var strjson = {
//    code : function (str_in) {
//        var jsonRes = {}

//        for (var i = 0; i < str_in.length; i++) {
//            jsonRes [i] = str_in.charCodeAt (i)
//        }

//        return jsonRes
//    },

//    decode : function (jsonObj) {
//        var strRes = ""
//        
//        for (var key in jsonObj) {
//            if (!isNaN(jsonObj[key])) {
//                if (jsonObj[key] == 60)
//                    strRes += "&lt;"
//                else
//                    strRes += String.fromCharCode(jsonObj[key])
//            }
//            else
//                ;
//        }

//        strRes = strRes.replace(/(&gt;)/g, ">").replace(/(&lt;)/g, "<").replace(/(&nbsp)/g, '')

//        return strRes
//    }
//}